function Cooker(id,name,pay){
    Staff.call(this,id,name,pay)
    this.type = 2
    this.cookList = [] //待做菜单
    this.c_status = 0 //0空闲1做菜 
  } 
Cooker.prototype.cookDish = function(){//做菜
    console.log(this.cookList)
    let time  = 0 //做菜时间间隔
    for(let i=0;i<this.cookList.length;i++){
       time += this.cookList[i].time
        setTimeout(()=>{
            this.cookList[i].cai_status = 1
            console.log('厨师正在做' + this.cookList[i].name)
        
         },baseTime * time)
    //    new Promise((reslove,reject)=>{
    //         setTimeout(()=>{
    //             console.log('厨师正在做' + this.cookList[i].name)
    //             reslove({obj:this.cookList[i],ind:i})
    //         },baseTime * time)
    //     }).then(res=>{
    //         console.log(res.obj)
    //         // this.cookList.splice(0,res.ind)
    //         console.log(this.cookList)
    //     })
    }
} 